package application;

import javafx.beans.property.DoubleProperty;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

public class DataPoint
{
	private final double time;
	private final double x;
	private final double y;
	private final double z;

	private StringProperty timeProp;
	private DoubleProperty xProp;
	private DoubleProperty yProp;
	private DoubleProperty zProp;

	public DataPoint(double time, double x, double y, double z)
	{
		this.time = time;
		this.x = x;
		this.y = y;
		this.z = z;

		setTimeProp(String.valueOf(time));
		setXProp(x);
		setYProp(y);
		setZProp(z);
	}

	public void setTimeProp(String value)
	{
		timeProperty().set(value);
	}

	public String getTimeProp()
	{
		return timeProperty().get();
	}

	public StringProperty timeProperty()
	{
		if (timeProp == null) timeProp = new SimpleStringProperty(this, "timeProp");
		return timeProp;
	}

	public void setXProp(double value)
	{
		xProperty().set(value);
	}

	public Double getXProp()
	{
		return xProperty().get();
	}

	public DoubleProperty xProperty()
	{
		if (xProp == null) xProp = new SimpleDoubleProperty(this, "xProp");
		return xProp;
	}

	public void setYProp(double value)
	{
		yProperty().set(value);
	}

	public Double getYProp()
	{
		return yProperty().get();
	}

	public DoubleProperty yProperty()
	{
		if (yProp == null) yProp = new SimpleDoubleProperty(this, "yProp");
		return yProp;
	}

	public void setZProp(double value)
	{
		zProperty().set(value);
	}

	public Double getZProp()
	{
		return zProperty().get();
	}

	public DoubleProperty zProperty()
	{
		if (zProp == null) zProp = new SimpleDoubleProperty(this, "zProp");
		return zProp;
	}

}
